package com.heze.dao;

import com.heze.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import javax.jws.soap.SOAPBinding;
import java.util.List;
import java.util.Map;

/**
 * @author 何泽
 * @version 1.0
 */
public interface UserMapper {
    //查询全部用户
    List<User> getUserList();

    //根据ID查询用户
    User getUserById(int id);

    //insert一个用户
    int addUser(User user);

    //修改用户
    int updateUser(User user);

    //删除用户
    int delUserById(@Param("id") int id);

    //分页
    List<User> getUserByLimit(Map<String, Integer> map);

    @Select("select * from user")
    List<User> getUsers();
}
